home *** CD-ROM | disk | FTP | other *** search
/ AEMail 2.40 / AEMail v2.40.iso / arexx / aemail-arexx.doc < prev    next >
Text File  |  2000-03-11  |  73KB  |  1,866 lines

  1.                           AEMAIL AREXX INTERFACE
  2.  
  3.                                Introduction
  4.                                ------------
  5.  
  6. AEMail has a very powerful set of ARexx commands that can be used to
  7. control AEMail from external ARexx scripts.  You can also execute ARexx
  8. scripts and AmigaDOS scripts from within AEMail.
  9.  
  10. When you want to send commands from an ARexx script to AEMail, you must
  11. tell ARexx how to locate the AEMail ARexx message port.  The AEMail ARexx
  12. Port Name is normally "AEMAIL1".  You can change this port name with the
  13. use of the "AREXXPORT=" tool type (See TOOL TYPES under Section IV.
  14. CONFIGURATION).  The current Arexx Port Name is shown in the About message
  15. obtained with the "About" item under the Project Menu.
  16.  
  17. You tell ARexx what the message port name for AEMail is by using the ARexx
  18. ADDRESS commmand in an ARexx script like this:
  19.  
  20.     ADDRESS AEMAIL1
  21.  
  22. If you call an ARexx script from AEMail, the ADDRESS command is
  23. automatically set to the AEMail ARexx message port.
  24.  
  25. There are several ways you can execute an ARexx script in AEMail.  You can
  26. use the ARexx/DOS menu items "Send AREXX/DOS Command...", "Send Last
  27. Command", or, if a menu title has been assigned to the ARexx script, by
  28. the menu item with that title (see VII.  AEMAIL MENUS).  You can also bind
  29. ARexx scripts to a function key.  You can have up to 40 selections since
  30. the Shift, CTRL, and ALT keys can be used in conjunction with the function
  31. keys.  When you press the appropriate function key the ARexx script bonded
  32. to it will be executed.
  33.  
  34. Two event exits have also been provided which can have ARexx scripts
  35. executed when you double click on a web address or an email address in a
  36. message.
  37.  
  38. Setting the menu title, the event exits, or the function key assigned to
  39. the command is done with the ARexx Page of the Configuration Setup (See
  40. Section IV.  Configuration).
  41.  
  42. After each command directed at AEMail from an ARexx script is executed,
  43. the standard ARexx result variable, RC, will report the success or failure
  44. of the command.  A 0 in RC indicates that the command was understood and
  45. executed successfully.  An RC value other than 0 indicates an error
  46. severity indicator.  The exact error text is reported in the Arexx
  47. AEMAIL.LASTERROR variable.
  48.  
  49. All of the AEMail ARexx commands also report back information if they
  50. were executed successfully (RC = 0).  This information is reported in the
  51. ARexx variable RESULT.  To receive this information you must supply the
  52. following ARexx command at the beginning of the ARexx script:
  53.  
  54.     OPTIONS RESULTS
  55.  
  56. You will notice that some commands have possible negative numbers for
  57. RESULT values.  The RESULT variable usually returns either a numeric value
  58. or a string.  If a numeric value is returned and if it is positive and
  59. above zero, the expected result was achieved.  If the value was 0 or
  60. negative, the expected result was not achieved.  Some commands that
  61. normally return strings in the RESULT variable may also return a NULL
  62. string or a negative numeric value.  The negative numeric value is used to
  63. denote various reasons the string value was not returned.  If there is
  64. only one reason, the command will normally return a "0" or a NULL value;
  65. but if there is more than one reason, the additional reasons will be
  66. indicated with a negative number.  An example would be a command that is
  67. expected to return the Subject:  from the current message.  A result of
  68. NULL or blank indicates that there was no Subject:  header and a result of
  69. "-1" indicates that there is no current message.  These two conditions
  70. need to be distinguished.
  71.  
  72. Below is a both a list of the currently available AEMail ARexx commands
  73. and a section which describes each command in detail.  Many of the
  74. commands are available to registered users only.  These will be so noted
  75. in the command list.
  76.  
  77. Some of the commands are composed of multiple words.  To avoid confusion
  78. these multiple words are sometimes separated by an underline character
  79. ("_").  As an example "ADDRESS_BOOK" separates ADDRESS and BOOK with the
  80. underline.  This is to avoid confusion with "ADDRESS" which is a standard
  81. ARexx command.  If an underline is required, it will be shown in the
  82. command syntax.
  83.  
  84. QUOTING:  Some command have parameters with embedded ARexx command
  85. characters such as +, -, |, etc.  To avoid the possibilty of ARexx
  86. interpreting these as ARexx operations, the parameter should be surrounded
  87. by quotes (either single or double quotes).  An example of where this is
  88. very important is the first parameter of the OKAY2 command.  Each of the
  89. possible responses in the OKAY2 command is separated by a vertical bar
  90. ("|") such as "OK|CANCEL".  The entire response parameter needs to be
  91. surrounded in quotes as shown or otherwise the vertical bar will be
  92. intrepreted by ARexx as an "inclusive or" operation.
  93.  
  94. Another condition requiring quoting is passing strings with embedded
  95. spaces.  This usually requires a bit of "creative" quoting because ARexx
  96. always strips at least one set of quotation marks from all strings.
  97. Fortunately ARexx considers both the double quote (") and the single quote
  98. (') as quotes.  To provide for the proper treatment of strings with
  99. embedded spaces (such as some file and path names or title strings), you
  100. have to use a double grouping of quotes.
  101.  
  102. For example:
  103.  
  104.     GETFILENAME '"The Title String"' '"A file name path"'
  105.  
  106. will send "The Title String" and "A file name path" to AEMail which will
  107. recognize these strings as two quoted operands.
  108.  
  109. ARexx variables which might have embedded spaces in their contents must
  110. also be quoted as above.  You can do this as follows:
  111.  
  112.     filename = "A file name path"
  113.     title = "The Title String"
  114.     GETFILENAME '"'title'"' '"'filename'"'
  115.  
  116. This ensures that ARexx, when it strips off a set of quotation marks and
  117. replaces the variables with their contents, will also pass a set of
  118. quotation marks around the resulting strings.  AEMail will then recognize
  119. the passed strings as two string operands rather than many unconnected
  120. words.
  121.                         Synopsis of ARexx Commands
  122.                         --------------------------
  123.  
  124. The following is a list of the currently available AEMail ARexx commands.
  125. This list also indicates which commands are only available to registered
  126. users with an (R) following the command.
  127.  
  128. A complete description of all of the commands and the command variations
  129. follows this list.
  130.  
  131. ADDRESS_BOOK (R)    Manipulates the AEMail Address Book
  132. BCC (R)             Returns the BCC header in a message
  133. CC (R)              Returns the CC header in a message
  134. COMPOSE             Composes a message
  135. CURRENT IS SELECTED Makes the selected message current
  136. DATE (R)            Returns the DATE header in a message
  137. EXTRACT (R)         Parses a name string to real name or email address
  138. FIRST (R)           Selects first message in folder or name in name string
  139. FLAGS (R)           Returns the flags in a message
  140. FOLDER (R)          Returns information on folders
  141. FROM (R)            Returns the FROM header in a message
  142. GETCLIP (R)         Get a clip from the clipboard
  143. GETFILENAME         Brings up the AEMail file requester
  144. GETLISTITEM         Brings up the AEMail list view requester
  145. GETNUMBER           Brings up the AEMail numeric requester
  146. GETSIZE (R)         Returns the size of a message or message body
  147. GETSTRING           Brings up the AEMail string requester
  148. GETVAR              Gets a variable from message
  149. LAST (R)            Selects last message in a folder
  150. MESSAGE (R)         Sets various flags in a message
  151. NEXT (R)            Selects next message in folder or name in name string
  152. OKAY1               Brings up AEMail notification requester
  153. OKAY2               Brings up AEMail notification requester with responses
  154. PREVIOUS (R)        Selects the previous message in a folder
  155. QUEUE               Queues a passed message
  156. QUIT                Terminates AEMail
  157. REPLYTO (R)         Returns the REPLY-TO header in a message
  158. SAVE (R)            Saves a message or message text
  159. SCREENTOBACK        Brings a screen to the back of the display
  160. SCREENTOFRONT       Brings a screen to the front of the display
  161. SUBJECT (R)         Returns the SUBJECT header in a message
  162. TO (R)              Returns the TO header in a message
  163.  
  164.  
  165.                               ARexx Commands
  166.                               --------------
  167.  
  168. The following is a description of all of the currently available AEMail
  169. ARexx commands in alphabetical order.  Shown with each of the commands is
  170. what you can expect to have returned in the RESULT variable.  Please note
  171. the use of the OKAY1 and OKAY2 commands.  You can use these to report back
  172. information to the AEMail user.  These commands put up a requester with
  173. the information you provide.
  174.  
  175. You will also notice in the command descriptions the use of the term
  176. "current message".  This applies to ARexx commands only and is not the
  177. "selected message" that is indicated by an asterick (*) in the displayed
  178. message list; although, you can make the most recent (current) "selected
  179. message" the "current message" (see the CURRENT IS SELECTED command below)
  180. and you can "select" a current message (the MESSAGE SELECT command).
  181. Initially "current message" is un-defined, but once it is defined it will
  182. remain defined through multiple calls from ARexx scripts until AEMail
  183. terminates or the "current message" is changed through the use of another
  184. ARexx command.
  185.  
  186.  
  187.  
  188.                                ADDRESS_BOOK
  189.  
  190. This command is used to manipulate the AEMail Address Book.  There are a
  191. number of variations of the ADDRESS_BOOK command.  They are listed below.
  192. If the correct command keyword ("LIST", "FIND", "ADD", etc.) is not
  193. present, an RC code of severity level 5 will be returned and
  194. AEMAIL.LASTERROR will contain "101:  Syntax Error".
  195.  
  196. Note the use of the parameter called "userid".  This can be either an
  197. email address or a referenced nickname pointing to another individual or
  198. group entry.  When a userid is returned, you can test if it is a nickname
  199. by using the ADDRESS_BOOK GET nickname TYPE command.
  200.  
  201. ***
  202.  
  203. Syntax: ADDRESS_BOOK LIST ALL [DESCRIPTION] [pad]
  204.         ADDRESS_BOOK LIST GROUP [DESCRIPTION] [pad]
  205.         ADDRESS_BOOK LIST INDIVIDUAL [DESCRIPTION] [pad]
  206.  
  207. This command will list the nicknames in your address book.  The operand
  208. "ALL" will list all of the nicknames, the operand "GROUP" will list just
  209. the group nicknames, and "INDIVIDUAL" will list just the individual
  210. nicknames.
  211.  
  212. The optional keyword "DESCRIPTION" can be used to also return the
  213. Description or Real Name field following the nickname.  In this event the
  214. nickname will be padded out with spaces so that so that it will be a fixed
  215. length of 11 characters (always ending with at least one space).  This
  216. means that the description field will always start in a fixed position.
  217.  
  218. Normally each nickname is separated by a space.  However, this can be
  219. changed by a specifying a pad string at the end of the command.  You can
  220. use the LF keyword to specify a line feed or use some other character
  221. sequence for the pad string.  As an example:  ", " will insert a comma
  222. followed by a space between each nickname in the list.
  223.  
  224. RESULT: The list of nicknames separated by the pad character.
  225.  
  226. ***
  227.  
  228. Syntax: ADDRESS_BOOK FIND nickname [userid]
  229.  
  230. This command is used to find out if a particular userid (email address or
  231. referenced nickname) is contained in a group entry in the Address Book.
  232. You can explicity give the userid or the email address can be obtained
  233. from the current message.  If the userid is not specified, both the From:
  234. and Reply-To:  addresses from the current message will be used to check if
  235. the email address is in the group entry specified by nickname.  The
  236. nickname operand is required and must be a group nickname.
  237.  
  238. RESULT: -3          No current message if userid not given
  239.         -2          The nickname is not for a group entry in the Address
  240.                     Book
  241.         -1          The nickname given is not in the Address Book.
  242.         0           The userid was not found
  243.         1           The userid found.  If not supplied, the userid that
  244.                     was found was an email address from the From: address
  245.                     in the current message.
  246.         2           The Reply-To: address in the current message was found
  247.                     in the group.
  248.         3           Both the Reply-To: and From: addresses were found.
  249.                     Note: these addresses may actually be the same.
  250.  
  251. ***
  252.  
  253. Syntax: ADDRESS_BOOK CREATE GROUP nickname ["SEND-HEADER-ONLY"|SHO],
  254.             FROM|REPLYTO|userid description
  255.  
  256. This entry creates a new group entry in the Address Book.  When you create
  257. a group entry you must have one userid (email address or referenced
  258. nickname) entry to place in the group.  You are not allowed to have a
  259. group without any entries.
  260.  
  261. The nickname for the new group must be supplied and it must not be greater
  262. than 9 characters.  It can not, of course, match any existing nickname.
  263.  
  264. "SEND-HEADER-ONLY" is an optional keyword operand which sets the "Send
  265. Header Only" flag in the group entry and must be quoted.  You can use the
  266. shorthand abreviation "SHO" instead of the full "SEND-HEADER-ONLY" string.
  267.  
  268. The userid which is added can be explicity specified or it can be the
  269. email address taken from either the From:  or Reply-To:  address in the
  270. current message.  Use the keyword operands "FROM" or "REPLYTO" to specify
  271. which header field in the current message is to be used.  If you specify
  272. "REPLYTO" and that header is missing, an error condition will be returned
  273. (see below).
  274.  
  275. There is no validation performed on the user_id.  If it is an email
  276. address it should be one word without any intervening spaces.  It should
  277. be within a quoted string to avoid confusion with ARexx special symbols.
  278. If it is a nickname with embedded spaces it must be double quoted (two
  279. pairs of quote marks - ie, '"........"'.
  280.  
  281. The description operand is placed in the "Real Name" field in the Address
  282. Book entry and must be given.  It may have embedded spaces and should be
  283. quoted.  If you want quotes to appear in the group description you should
  284. use the ARexx method for including embedded quotes (i.e.,
  285. '"....string...."' or '"'variable'"'.
  286.  
  287.  
  288. RESULT: -4          The REPLYTO operand was specified and there is no
  289.                     Reply-To: header in the current message.
  290.         -3          No current message if userid not given
  291.         -1          The nickname given is greater than 9 characters.
  292.         0           The nickname given was already defined in the Address
  293.                     Book.
  294.         1           The group entry was successfully created.
  295.  
  296. ***
  297.  
  298. Syntax: ADDRESS_BOOK ADD TO GROUP nickname FROM
  299.         ADDRESS_BOOK ADD TO GROUP nickname REPLYTO
  300.         ADDRESS_BOOK ADD TO GROUP nickname userid
  301.  
  302. This command adds an userid (email address or referenced nickname) to an
  303. existing group in the Address Book.  The nickname operand specifies the
  304. group the userid is to be added to and is a required parameter.
  305.  
  306. The userid which is added can be explicity specified or it can be the
  307. email address taken from either the From:  or Reply-To:  address in the
  308. current message.  Use the keyword operands "FROM" or "REPLYTO" to specify
  309. which header field in the current message is to be used.  If you specify
  310. "REPLYTO" and that header is missing, an error condition will be returned
  311. (see below).
  312.  
  313. There is no validation performed on the user_id.  If it is an email
  314. address it should be one word without any intervening spaces.  It should
  315. be within a quoted string to avoid confusion with ARexx special symbols.
  316. If it is a nickname with embedded spaces it must be double quoted (two
  317. pairs of quote marks - ie, '"........"'.
  318.  
  319.  
  320. RESULT: -4          The REPLYTO operand was specified and there is no
  321.                     Reply-To: header in the current message.
  322.         -3          No current message if userid not specified.
  323.         -2          The nickname is not for a group entry in the Address
  324.                     Book
  325.         -1          The nickname given was not found.
  326.         0           The userid given was already defined in the group.
  327.         1           The userid was successfully added to the group.
  328.  
  329.  
  330. ***
  331.  
  332. Syntax: ADDRESS_BOOK ADD INDIVIDUAL nickname FROM [real-name]
  333.         ADDRESS_BOOK ADD INDIVIDUAL nickname REPLYTO [real-name]
  334.         ADDRESS_BOOK ADD INDIVIDUAL nickname userid [real-name]
  335.  
  336. This command adds a new individual nickname to the Address Book.  The
  337. nickname for the new group must be supplied and it must not be greater
  338. than 9 characters.  It can not, of course, match any existing nickname.
  339.  
  340. The userid which is assign to the new nickname is required and can be
  341. explicity specified or it can be the email address taken from either the
  342. From:  or Reply-To:  header in the current message.  Use the keyword
  343. operands "FROM" or "REPLYTO" to specify which header field in the current
  344. message is to be used.  If you specify "REPLYTO" and that header is
  345. missing, an error condition will be returned (see below).
  346.  
  347. There is no validation performed on the user_id.  If it is an email
  348. address it should be one word without any intervening spaces.  It should
  349. be within a quoted string to avoid confusion with ARexx special symbols.
  350. If it is a nickname with embedded spaces it must be double quoted (two
  351. pairs of quote marks - ie, '"........"'.
  352.  
  353. The real-name operand is placed in the "Real Name" field in the Address
  354. Book entry.  It is an optional entry.  It may have intervening spaces.  It
  355. should be quoted.  If you want quotes to appear in the group description
  356. you should use the ARexx method for including embedded quotes (i.e.,
  357. '"....string...."' or '"'variable'"'.
  358.  
  359. If a current message is used to obtain the userid (either the "FROM" or
  360. "REPLYTO" keyword operands) any real name supplied with the header will
  361. take precedence over the real-name operand if it is present.
  362.  
  363. RESULT: -4          The REPLYTO operand was specified and there is no
  364.                     Reply-To: header in the current message.
  365.         -3          No current message if userid not specified.
  366.         -1          The nickname given is greater than 9 characters.
  367.         0           The nickname given was already defined.
  368.         1           The nickname and userid was successfully added to the
  369.                     Address Book.
  370.  
  371. ***
  372.  
  373. Syntax: ADDRESS_BOOK DELETE FROM GROUP nickname FROM
  374.         ADDRESS_BOOK DELETE FROM GROUP nickname REPLYTO
  375.         ADDRESS_BOOK DELETE FROM GROUP nickname userid
  376.  
  377. This command deletes a userid from the group indicated by nickname.
  378.  
  379. The userid which is to be deleted is required and can be explicity
  380. specified or it can be the email address taken from either the From:  or
  381. Reply-To:  address in the current message.  Use the keyword operands
  382. "FROM" or "REPLYTO" to specify which header field in the current message
  383. is to be used.  If you specify "REPLYTO" and that header is missing, an
  384. error condition will be returned (see below).
  385.  
  386. There is no validation performed on the user_id.  If it is an email
  387. address it should be one word without any intervening spaces.  It should
  388. be within a quoted string to avoid confusion with ARexx special symbols.
  389. If it is a nickname with embedded spaces it must be double quoted (two
  390. pairs of quote marks - ie, '"........"'.
  391.  
  392. If the userid is the only userid in the group, it will not be deleted.
  393. No group can exist without at lease one userid.  In this special case a
  394. RESULT code of -5 will be returned.  To delete the one remaining userid
  395. you must delete the entire group (see "ADDRESS-BOOK DELETE GROUP" below.
  396.  
  397. RESULT: -5          The userid specified was the only userid in the
  398.                     group and WAS NOT DELETED.  Use the "ADDRESS_BOOK
  399.                     DELETE GROUP" command to delete entire group.
  400.         -4          The REPLYTO operand was specified and there is no
  401.                     Reply-To: header in the current message.
  402.         -3          No current message if userid not specified.
  403.         -2          The nickname is not for a group entry in the Address
  404.                     Book
  405.         -1          The nickname given was not found.
  406.         0           The userid was not present in the group.
  407.         1           The userid was deleted from the group.
  408.  
  409. ***
  410.  
  411. Syntax: ADDRESS_BOOK DELETE GROUP nickname
  412.  
  413. This command deletes the entire group specified by nickname and all of
  414. it's associated userids.
  415.  
  416. RESULT: -2          The nickname given is not for a group entry in the
  417.                     Address Book
  418.         -1          The nickname given was not found.
  419.  
  420.         1           The group was successfully deleted.
  421.  
  422. ***
  423.  
  424. Syntax: ADDRESS_BOOK DELETE INDIVIDUAL nickname
  425.  
  426. This command deletes the nickname provided.  It must be the nickname for
  427. an individual.
  428.  
  429. RESULT: -2          The nickname given is for a group entry in the
  430.                     Address Book.  No deletion was performed.
  431.         0           The individual's nickname was not present.
  432.         1           The individual's nickname was successfully deleted.
  433.  
  434. ***
  435.  
  436. Syntax: ADDRESS_BOOK GET nickname TYPE
  437.  
  438. This command obtains the type, group or individual, for the Address Book
  439. entry specified by "nickname".
  440.  
  441. RESULT: -1          The nickname given does not exist.
  442.          0          Nickname was for an individual entry.
  443.          1          Nickname was for a group entry.
  444.  
  445. ***
  446.  
  447. Syntax: ADDRESS_BOOK GET nickname REALNAME
  448.  
  449. This command obtains the "Real Name" or Group Description for the Address
  450. Book entry specified by "nickname".
  451.  
  452. RESULT: -1              The nickname given does not exist.
  453.          NULL or blank  No real name was present.
  454.          "Real Name" or group description string
  455.  
  456. ***
  457.  
  458. Syntax: ADDRESS_BOOK GET nickname USERID
  459.  
  460. This command obtains the userid for the Address Book entry specified by
  461. "nickname".  This command can only be used with Individual nicknames.
  462.  
  463. RESULT: -2          The nickname given is not for an individual entry.
  464.         -1          The nickname given does not exist.
  465.          "userid"  This may be either an email address or a referenced
  466.                     nickname.  Use the ADDRESS_BOOK GET nickname TYPE
  467.                     command to determine if it is a nickname rather than
  468.                     an email address.
  469.  
  470. ***
  471.  
  472. Syntax: ADDRESS_BOOK GET nickname FIRST USERID
  473.  
  474. This command obtains the first userid for the Address Book group entry
  475. specified by "nickname".  This command can only be used with Group
  476. nicknames.
  477.  
  478. This command must be issued before the GET NEXT USERID command described
  479. below is issued.  When this command is issued it resets the group for
  480. which you are attempting to obtain userids.
  481.  
  482. RESULT: -2          The nickname given is not for a group entry.
  483.         -1          The nickname given does not exist.
  484.          "userid"   This may be either an email address or a referenced
  485.                     nickname.  Use the ADDRESS_BOOK GET nickname TYPE
  486.                     command to determine if it is a nickname rather than
  487.                     an email address.
  488.  
  489. ***
  490.  
  491. Syntax: ADDRESS_BOOK GET nickname NEXT USERID
  492.  
  493. This command obtains the next userid for the Address Book group entry
  494. specified by "nickname".  This command can only be used with Group
  495. nicknames.
  496.  
  497. A GET nickname FIRST USERID command must be issued for the same nickname
  498. before the a GET nickname NEXT USERID command is issued.  This command
  499. will continue to get userids for the nickname until a NULL is received
  500. which signifies the end of list of userids for the group.  If you continue
  501. to try to issue NEXT USERID commands after the last userid is obtained you
  502. will get an error result as shown below.
  503.  
  504. RESULT: -3          A prior FIRST USERID command was not issued for this
  505.                     group nickname.
  506.         -2          The nickname given is not for a group entry.
  507.         -1          The nickname given does not exist OR you have issued
  508.                     the NEXT USERID command after the last one was
  509.                     obtained.
  510.          "userid"   This may be either an email address or a referenced
  511.                     nickname.  Use the ADDRESS_BOOK GET nickname TYPE
  512.                     command to determine if it is a nickname rather than
  513.                     an email address.
  514.          NULL       There are no more userids in the group.
  515.  
  516. ***
  517.  
  518. Syntax: ADDRESS_BOOK GET nickname "SEND-HEADER-ONLY-FLAG"|"SHO-FLAG"
  519.  
  520. This command obtains the state of the "Send Header Only" flag for the
  521. group entry specified by "nickname".  The operand can be specified as
  522. either "SEND-HEADER-ONLY-FLAG" or "SHO-FLAG" and must be quoted.  This
  523. command can only be used with Group nicknames.
  524.  
  525. RESULT: -2          The nickname given was not for a group entry.
  526.         -1          The nickname given does not exist.
  527.          0          The "Send Header Only" Flag was OFF.
  528.          1          The "Send Header Only" Flag was ON.
  529.  
  530. ***
  531.  
  532. Syntax: ADDRESS_BOOK GET nickname COUNT
  533.  
  534. This command obtains the count of userid entries in the group entry
  535. specified by "nickname".  This command is can only be used with Group
  536. nicknames.
  537.  
  538. RESULT: -2          The nickname given was not for a group entry.
  539.         -1          The nickname given does not exist.
  540.  
  541.          n          The count of userids in the group entry.
  542.  
  543.  
  544.                                    BCC
  545.  
  546. Syntax: BCC
  547.  
  548. This command returns the bcc:  header of the current message without the
  549. bcc:.  It has no operands.
  550.  
  551. RESULT: -1              No current message
  552.         NULL or blanks  No bcc: header
  553.         bcc: header
  554.  
  555.  
  556.                                     CC
  557.  
  558.  
  559. Syntax: CC
  560.  
  561. This command returns the cc:  header of the current message without the
  562. cc:.  It has no operands.
  563.  
  564. RESULT: -1              No current message
  565.         NULL or blanks  No cc: header
  566.         cc: header
  567.  
  568.  
  569.                                  COMPOSE
  570.  
  571. All of the variations of the COMPOSE command bring up the AEMail compose
  572. window for further action.  If for any reason the Compose window returns
  573. any error such as the failure to open the Compose window or an out of
  574. memory condition, the error will be returned in AEMAIL.LASTERROR with the
  575. RC set to a severity level of 20.  This error will not have an error
  576. number associated with it.
  577.  
  578. The syntax of the various variations of the COMPOSE command are as
  579. follows:
  580.  
  581. ***
  582.  
  583. Syntax: COMPOSE
  584.  
  585. The COMPOSE command without any operands brings up the Compose window to
  586. compose a new message.
  587.  
  588. RESULT: 0:          User canceled message compose.  No message composed.
  589.         1:          Message composed and placed in PENDING folder.
  590.         2:          Message composed and placed in QUEUED folder.
  591.         3:          Message composed and sent.
  592.  
  593. ***
  594.  
  595. Syntax: COMPOSE NEW MESSAGE
  596.  
  597. The Compose window will be brought up to compose a new message.
  598.  
  599. RESULT: 0:          User canceled message compose.  No message composed.
  600.         1:          Message composed and placed in PENDING folder.
  601.         2:          Message composed and placed in QUEUED folder.
  602.         3:          Message composed and sent.
  603.  
  604. ***
  605.  
  606. Syntax: COMPOSE REPLY
  607.  
  608. The Compose window will be brought up to compose a reply to the current
  609. message using the Reply-To: address as the recipient.  If the Reply-To:
  610. address is not available, the From:  address will be used.
  611.  
  612. RESULT: -1:         There is no current message defined.
  613.          0:         The user cancelled the operation.  No message was
  614.                     composed.
  615.          1:         Message composed and placed in PENDING folder.
  616.          2:         Message composed and placed in QUEUED folder.
  617.          3:         Message composed and sent.
  618. ***
  619.  
  620. Syntax: COMPOSE REPLY FROM
  621.  
  622. The Compose window will be brought up to compose a reply to the current
  623. message using the From: address as the recipient.
  624.  
  625. RESULT: -1:         There is no current message defined.
  626.          0:         The user cancelled the operation.  No message was
  627.                     composed.
  628.          1:         Message composed and placed in PENDING folder.
  629.          2:         Message composed and placed in QUEUED folder.
  630.          3:         Message composed and sent.
  631.  
  632. ***
  633.  
  634. Syntax: COMPOSE FORWARD [userid]
  635.  
  636. The Compose window will be brought up to forward the current message.  If
  637. the userid (email address or referenced Address Book nickname) is
  638. provided, this will be used as the recipient (To:  address) of the
  639. forwarded message; otherwise, the To:  address will be blank and user will
  640. have to provide it.
  641.  
  642. RESULT: -1:         There is no current message defined.
  643.          0:         The user cancelled the operation.  No message was
  644.                     composed.
  645.          1:         Message composed and placed in PENDING folder.
  646.          2:         Message composed and placed in QUEUED folder.
  647.          3:         Message composed and sent.
  648. ***
  649.  
  650. Syntax: COMPOSE MAILTO userid
  651.  
  652. The Compose window will be brought up to compose a new message to be
  653. mailed to the recipient indicated by the userid.  The userid can be either
  654. an Address Book nickname or a full email-address and must be given.
  655.  
  656. No validation is made on the userid.  If it is invalid, either the user
  657. will receive an error when the message is sent or a message will be
  658. received indicating "Returned mail:  User unknown".
  659.  
  660. RESULT: 0:          The user cancelled the operation.  No message was
  661.                     composed.
  662.         1:          Message composed and placed in the PENDING folder.
  663.         2:          Message composed and placed in the QUEUED folder.
  664.         3:          Message composed and sent.
  665.  
  666. ***
  667.  
  668. Syntax: COMPOSE "message-file-name"
  669.  
  670. The Compose window will be brought up and the message file indicated by
  671. "message-file-name" will be read into the system and used as the message
  672. to edit.  This message must have correctly formatted headers.  Only the
  673. To:, From:, Reply-To:, Subject:, cc:, and bcc: headers will be recognized.
  674. A blank line must separate the headers from the body of the message.
  675.  
  676. The "message-file-name" should be the full path name of the message file
  677. and it should be quoted since the path will contain characters that ARexx
  678. will attempt to interpret as operators or possibly embedded spaces.
  679.  
  680. Any address provided with the To: header can be either an Address Book
  681. nickname or a full email address.  Multiple To: addresses can be provided
  682. as well as multiple cc: or bcc: addresses.
  683.  
  684. No headers have to be provided with the message.  The headers can be
  685. provided on the Compose window.  However, if this is done, a blank line
  686. MUST precede the message body in the message file.
  687.  
  688. Additional RC type errors can be received by this command if the
  689. message-file-name is invalid or an error occurred reading in the message
  690. file.  Each of these errors have a severity level of 5 with one of the
  691. following messages placed in the AEMAIL.LASTERROR variable:
  692.  
  693.     105: Error Opening Passed Message
  694.     106: Error retrieving passed message
  695.  
  696. If you would like to use the File Requester to obtain the file name before
  697. passing it to this command, you can use the GETFILENAME command to obtain
  698. the full path name of the message.
  699.  
  700. No validation is made on the To:  address in the message.  If it is
  701. invalid, either the user will receive an error when the message is sent or
  702. a message will be received indicating "Returned mail:  User unknown".
  703.  
  704. RESULT: 0:          The user cancelled the operation.  No message was
  705.                     composed.
  706.         1:          Message composed and placed in PENDING folder.
  707.         2:          Message composed and placed in QUEUED folder.
  708.         3:          Message composed and sent.
  709.  
  710.  
  711.  
  712.                            CURRENT IS SELECTED
  713.  
  714. Syntax: CURRENT IS SELECTED
  715.  
  716. This command makes the currently selected message the current message.
  717. The currently selected message is the message that is highlighted in the
  718. message list or the message that is currently being displayed.  The
  719. message may or may not have a selection asterick.
  720.  
  721. RESULT: 0           There was no selected message.
  722.         1           Current message is now the selected message.
  723.  
  724.  
  725.  
  726.                                    DATE
  727.  
  728. Syntax: DATE
  729.         DATE MDY
  730.         DATE DMY
  731.         DATE YMD
  732.  
  733. This command returns the Date:  header of the current message header
  734. without the "Date:".
  735.  
  736. Without an operand, this command returns the date as it was received in
  737. the Date:  header of the message.  With the operand "MDY" it returns the
  738. date as mm/dd/yy.  The operand "DMY" returns the date as dd/mm/yy and
  739. "YMD" returns yy/mm/dd.  All of the fields are two digits which means that
  740. yy will be the last 2 digits of the year.
  741.  
  742. The alternate formats are provided so that the date field can be stored in
  743. a data base such as one created with "Final Data".
  744.  
  745. RESULT: -1              No current message
  746.         NULL or blanks  No Date: header
  747.         Date: field
  748.  
  749.                                  EXTRACT
  750.  
  751. Syntax: EXTRACT REALNAME name-string
  752.         EXTRACT USERID name-string
  753.  
  754. This command extracts either the REALNAME or the USERID (email address
  755. or address book nickname) from a name string that is usually the result of
  756. the FIRST TONAME, FIRST CCNAME, FIRST BCCNAME or NEXT NAME commands
  757. (see below).  Because of the various formats of a name string; ie,
  758.  
  759.         email-address (Full Name)
  760.         Full Name <email-address>
  761.         email-address
  762.         addressbook-nickname
  763.  
  764. it is easier to use this command rather then to use standard ARexx
  765. commands to parse the name string.
  766.  
  767. If you use the ADDRESS_BOOK GET nickname TYPE command you can determine if
  768. a userid that is returned is a nickname or email address.
  769.  
  770. The name-string variable should be quoted since it will contain blanks and
  771. other characters ARexx may not like including double quote marks.  As an
  772. example:
  773.  
  774.     OPTION RESULTS
  775.     FIRST TONAME
  776.     name=RESULT
  777.     if name = "" THEN EXIT
  778.     EXTRACT USERID '"'name'"'
  779.     emailaddr=RESULT
  780.     ADDRESS_BOOK GET '"'emailaddr'"' TYPE
  781.     if RESULT = 0 THEN OKAY1 emailaddr" is an individual nickname."
  782.     ELSE if RESULT = 1 THEN OKAY1 emailaddr" is a group nickname."
  783.  
  784. RESULT: NULL or blank   No real name if REAL-NAME operand used.
  785.         Either the real name or userid string.
  786.                                   FIRST
  787.  
  788. This command is used to select the first message in the current folder or
  789. to select the first name string from the list of To:  or cc:  recipients.
  790.  
  791. ***
  792.  
  793. Syntax: FIRST
  794.         FIRST NEW
  795.         FIRST SELECTED
  796.         FIRST DELETED
  797.  
  798. Without an Operand this command selects the first message in the current
  799. selected folder as the current message.
  800.  
  801. With the NEW operand, this command selects the first un-read (new) message
  802. in the current selected folder as the current message.
  803.  
  804. If a message is unread but deleted, it will NOT be considered an un-read
  805. message.
  806.  
  807. With the SELECTED operand, this command selects the first selected
  808. (message marked with an asterick) message in the current selected folder
  809. as the current message.
  810.  
  811. With the DELETED operand, this command selects the first message marked as
  812. deleted in the current selected folder as the current message.
  813.  
  814. NOTE: The order of the messages in the folder is the un-sorted order.
  815. This generally means that the first message is the oldest message in the
  816. folder.
  817.  
  818. RESULT: 0       No messages of the particular type in the folder
  819.         1       First message is now the current message.
  820.  
  821. ***
  822.  
  823. Syntax: FIRST TONAME
  824.         FIRST CCNAME
  825.         FIRST BCCNAME
  826.  
  827. This command returns the first name from the appropriate header field
  828. (To:, cc:, or bcc:) in the current message.  The name can be in one of the
  829. following formats:
  830.  
  831.         email-address (Full Name)
  832.         Full Name <email-address>
  833.         email-address
  834.         addressbook-nickname
  835.  
  836. Names in the header recipient lists are separated by commas; however, a
  837. comma may be embedded within a real name if the real name is surrounded by
  838. quotes.
  839.  
  840. If you wish to extract either the Full Name, email-address, or the
  841. addressbook-nickname from the RESULT you can set the RESULT to a variable
  842. and then use the EXTRACT command with that variable as the argument.
  843.  
  844. RESULT: -1              There is no current message
  845.          NULL or blank  There are no names in this field.
  846.          The first name in the appropriate header.
  847.  
  848.  
  849.                                   FLAGS
  850.  
  851. Syntax: FLAGS
  852.  
  853. This command returns the flags for the current message.  The flags are
  854. returned in the RESULT field as indicated below.  A message can have
  855. multiple flags which means that a value will be returned with the two or
  856. more values for the flags added together.  As an example, a message that
  857. is unread and new with attachments will return a value of 11.  You will
  858. need to use the ARexx operator for logical AND to isolate the flag you
  859. want.
  860.  
  861. Here is a piece of ARexx code to isolate a message that is unread:
  862.  
  863.     OPTION RESULTS
  864.  
  865.     FLAGS
  866.  
  867.     IF RESULT = -1 THEN OKAY1 "There is no current message"
  868.     ELSE DO
  869.  
  870.         IF RESULT & 2 THEN OKAY1 "This message is unread"
  871.         ELSE OKAY1 "This message has been read"
  872.  
  873.         END
  874.  
  875. Note the distinction between flag values 1 (for New) and 2 (for Unread).
  876. Generally, when a message is first read into the system both flags are
  877. set.  If the message is read, both flags are turned off.  However, if the
  878. message should be deleted without being read, the Unread flag will be
  879. turned off but the New flag will remain on.  If that message then becomes
  880. un-deleted and the New flag is still on, the Unread flag will be turned
  881. back on.
  882.  
  883. RESULT: -1          No current message
  884.         0           There is a current message but no flags are set
  885.         1           Message is New and unread (can be deleted)
  886.         2           Message is unread but not deleted
  887.         4           Message is a reply
  888.         8           Message has attachments
  889.         16          Message has been forwarded
  890.         32          Message is deleted
  891.         64          Message is selected
  892.  
  893.  
  894.                                   FOLDER
  895.  
  896. There are a number of variations of the FOLDER command.  They are listed
  897. below:
  898.  
  899. ***
  900.  
  901. Syntax: FOLDER
  902.  
  903. The FOLDER command with no operands is used to return the current selected
  904. folder name.
  905.  
  906. RESULT: 0           No folder currently selected
  907.         The folder Name (i.e., "INBOX", "QUEUED", etc.)
  908.  
  909. ***
  910.  
  911. Syntax: FOLDER LIST_FOLDERS [pad]
  912.  
  913. This command will list all of the folders in your system.  Normally each
  914. folder is separated by a space.  However, this can be changed by
  915. specifying a pad string at the end of the command.  You can use the LF
  916. keyword to specify a line feed or use some other character sequence for
  917. the pad string.  As an example:  ", " will insert a comma followed by a
  918. space between each folder name in the list.
  919.  
  920. Notice that the keyword here is LIST_FOLDERS with an underline between
  921. LIST and FOLDERS.  If the keyword was simply LIST it might be
  922. mis-interpreted as a folder named LIST.
  923.  
  924. RESULT: The list of folders separated by the pad character.
  925.  
  926. ***
  927.  
  928. Syntax: FOLDER folder-name
  929.  
  930. This command selects the the folder indicated by folder-name.
  931.  
  932. RESULT: -1: folder-name is invalid.  Could be the result of a misspelling
  933.             of one of the operands used with the FOLDER commands so that
  934.             the operand is mis-interpreted as a folder-name.
  935.          0: The folder folder-name could not be selected.
  936.          1: The folder folder-name was selected.
  937.  
  938. ***
  939.  
  940. Syntax: FOLDER DESCRIPTION
  941.         FOLDER folder-name DESCRIPTION
  942.         FOLDER folder-name SELECT DESCRIPTION
  943.  
  944. This command returns the description of either the selected folder or, if
  945. present, the folder indicated by folder name.  If the folder name is
  946. present, it will not become the new selected unless the SELECT keyword
  947. immediately follows it.  This allows you to obtain the description of a
  948. folder without selecting it.
  949.  
  950. NOTE:  If the folder-name is left off the command and any of the
  951. parameters is misspelled, it could result in the misspelled parameter
  952. being mis-interpreted as a folder-name.
  953.  
  954. RESULT: -1: folder-name is invalid.  Could be the result of a misspelling
  955.             of one of the operands used with the following FOLDER commands
  956.             so that the operand is mis-interpreted as a folder-name.
  957.  
  958.          The description of either the folder specified with folder-name
  959.             or the selected folder.
  960.  
  961. ***
  962.  
  963. Syntax: FOLDER NUMBER_MESSAGES
  964.         FOLDER folder-name NUMBER_MESSAGES
  965.         FOLDER folder-name SELECT NUMBER_MESSAGES
  966.  
  967. This command returns the number of messages contained in either the
  968. selected folder or, if present, the folder indicated by folder name.  If
  969. the folder name is present, it will not become the new selected folder
  970. unless the SELECT keyword immediately follows it.  This allows you to
  971. obtain the number of messages from a folder without selecting it.
  972.  
  973. Please note the spelling of the operand NUMBER_MESSAGES with the underline
  974. between NUMBER and MESSAGES.  This makes the operand string longer than a
  975. folder-name so that it does not interfer with any existing folder-name.
  976.  
  977. NOTE:  If the folder-name is left off the command and any of the
  978. parameters is misspelled, it could result in the misspelled parameter
  979. being mis-interpreted as a folder-name.
  980.  
  981. RESULT: -1: folder-name is invalid.  Could be the result of a misspelling
  982.             of one of the operands used with the following FOLDER commands
  983.             so that the operand is mis-interpreted as a folder-name.
  984.  
  985.          n: The total number of messages in the folder including ones that
  986.             are unread or deleted.
  987.  
  988. ***
  989.  
  990. Syntax: FOLDER NEW_MESSAGES
  991.         FOLDER folder-name NEW_MESSAGES
  992.         FOLDER folder-name SELECT NEW_MESSAGES
  993.  
  994. This command returns the number of new (unread) messages contained in
  995. either the selected folder or, if present, the folder indicated by folder
  996. name.  If the folder name is present, it will not become the new selected
  997. folder unless the SELECT keyword immediately follows it.  This allows you
  998. to obtain the number of new messages from a folder without selecting it.
  999.  
  1000. If a message is unread but deleted, it will not be included in the count
  1001. of new messages.
  1002.  
  1003. Please note the spelling of the operand NEW_MESSAGES with the underline
  1004. between NEW and MESSAGES.  This makes the operand string longer than a
  1005. folder-name so that it does not interfer with any existing folder-name.
  1006.  
  1007. NOTE:  If the folder-name is left off the command and any of the
  1008. parameters is misspelled, it could result in the misspelled parameter
  1009. being mis-interpreted as a folder-name.
  1010.  
  1011. RESULT: -1: folder-name is invalid.  Could be the result of a misspelling
  1012.             of one of the operands used with the following FOLDER commands
  1013.             so that the operand is mis-interpreted as a folder-name.
  1014.  
  1015.          n: The number of new or unread messages in the folder.
  1016.  
  1017. ***
  1018.  
  1019. Syntax: FOLDER DELETED_MESSAGES
  1020.         FOLDER folder-name DELETED_MESSAGES
  1021.         FOLDER folder-name SELECT DELETED_MESSAGES
  1022.  
  1023. This command returns the number of deleted messages contained in either
  1024. the selected folder or, if present, the folder indicated by folder name.
  1025. If the folder name is present, it will not become the new selected folder
  1026. unless the SELECT keyword immediately follows it.  This allows you to
  1027. obtain the number of deleted messages from a folder without selecting it.
  1028.  
  1029. Please note the spelling of the operand DELETED_MESSAGES with the
  1030. underline between DELETED and MESSAGES.  This makes the operand string
  1031. longer than a folder-name so that it does not interfer with any existing
  1032. folder-name.
  1033.  
  1034. NOTE:  If the folder-name is left off the command and any of the
  1035. parameters is misspelled, it could result in the misspelled parameter
  1036. being mis-interpreted as a folder-name.
  1037.  
  1038. RESULT: -1: folder-name is invalid.  Could be the result of a misspelling
  1039.             of one of the operands used with the following FOLDER commands
  1040.             so that the operand is mis-interpreted as a folder-name.
  1041.  
  1042.          n: The number of deleted messages in the folder.
  1043.  
  1044. ***
  1045.  
  1046.                                    FROM
  1047.  
  1048. Syntax: FROM
  1049.  
  1050. This command returns the From:  header of the current message without the
  1051. "From:  ".  It has no operands.
  1052.  
  1053. RESULT: -1              No current message
  1054.         NULL or blanks  No From: header
  1055.         From: header
  1056.  
  1057.                                  GETCLIP
  1058.  
  1059. Syntax: GETCLIP
  1060.         GETCLIP n
  1061.         GETCLIP UNIT n
  1062.  
  1063. This command will return the current contents of the clipboard in the
  1064. result variable.  If "UNIT n" or "n" is not specified, it will be from the
  1065. current active clipboard.  If "UNIT n" or "n" (without UNIT) is specified
  1066. it will be from the clipboard unit specified by n.
  1067.  
  1068. If the clipboard unit is specified, the current active clipboard will be
  1069. changed to that unit UNLESS the clipboard unit was non-existant.
  1070.  
  1071. RESULT: NULL or blank   This clipboard unit is empty or non-existant.
  1072.         Data from the clipboard unit.
  1073.  
  1074. ***
  1075.  
  1076. Syntax: GETCLIP UNIT
  1077.  
  1078. This command will return the current active clipboard unit number.  Notice
  1079. that is similar to the previous command WITHOUT the clipboard unit number
  1080. (n).
  1081.  
  1082. RESULT: n       This current active clipboard unit number.
  1083.  
  1084.  
  1085.                                GETFILENAME
  1086.  
  1087. Syntax: GETFILENAME
  1088.         GETFILENAME title
  1089.         GETFILENAME title defaultpath
  1090.  
  1091. This command brings up the AEMail file requester so you can solicit file
  1092. names that can be used with commands that require file names.
  1093.  
  1094. If no operands are provided with this command, the file requester will
  1095. have "ARexx File Request" as the default title in the requester and a
  1096. default path of PROGDIR: (the directory from which AEMail was called).
  1097.  
  1098. The second form of this command allows you to provide your own title in
  1099. the file requester which may be more descriptive of what kind of file you
  1100. want.
  1101.  
  1102. The third form gives the user the ability to provide both a title and a
  1103. default file path and (if wanted) filename.  This is particularly useful
  1104. if you want to reference a different directory than your program
  1105. directory.  A default filename can be part of this path.
  1106.  
  1107. NOTE: If you supply a default path without a filename (directory only) you
  1108. must end the string with ":" or "/" to indicate that it is a directory and
  1109. not a filename path.
  1110.  
  1111. Be very careful in using this command since this is one that will require
  1112. "creative" quoting to insure that you have no more than two operand
  1113. strings.  As an example you should use something like this:
  1114.  
  1115.     GETFILENAME '"The Title String"' '"A file name path"'
  1116.  
  1117. This will send "The Title String" and "A file name path" to AEMail which
  1118. will recognize these strings as two quoted operands.
  1119.  
  1120. RESULT:  NULL or blank if the no filename was entered or the requester was
  1121.             cancelled.
  1122.          The full path and filename of the file that was selected.
  1123.  
  1124.                                GETLISTITEM
  1125.  
  1126. Syntax: GETLISTITEM list
  1127.         GETLISTITEM list title
  1128.  
  1129. This command brings up the AEMail list view requester so the user can
  1130. solicit a member of the list.  The operand list is a list of items, each
  1131. member of the list being separated by a line feed.  Many of the AEMail
  1132. commands can supply such a list.  As an example, "ADDRESS_BOOK LIST GROUP
  1133. DESCRIPTION LF" will supply a list of group Address Book entries and their
  1134. descriptions separated by line feeds.  Another example is "LIST_FOLDERS LF"
  1135. which will provide a list of all the folders in the system.
  1136.  
  1137. The list should be a quoted variable such as:
  1138.  
  1139.     ADDRESS_BOOK LIST GROUP DESCRIPTION LF
  1140.     grplist = RESULT
  1141.     GETLISTITEM "'"grplist"'"
  1142.  
  1143. This will insure that the entire list is treated as a single variable.
  1144.  
  1145. The second operand is the title that you want for the list view.  If this
  1146. operand is not provided, the list view requester will have "ARexx Select
  1147. List Item" as the default title.  The title should also be quoted.
  1148.  
  1149. When the list view is displayed and an item selected from the list it will
  1150. appear in a string gadget below the listview.  You can modify the
  1151. information in this string gadget if you wish.  An [OK] and [CANCEL]
  1152. gadget will also be displayed.  If you click on [OK] or press RETURN, the
  1153. information in the string gadget will be returned in the RESULT variable.
  1154.  
  1155. RESULT:  NULL or blank if the string gadget is blank or the requester was
  1156.             cancelled.
  1157.          The string that was entered in the string gadget at the bottom of
  1158.             the listview.
  1159.                                 GETNUMBER
  1160.  
  1161. Syntax: GETNUMBER
  1162.         GETNUMBER title
  1163.         GETNUMBER title default
  1164.         GETNUMBER title default min
  1165.         GETNUMBER title default min max
  1166.  
  1167. This command brings up the AEMail numeric requester so you can solicit a
  1168. numeric value.
  1169.  
  1170. If no operands are provided with this command, the numeric requester will
  1171. have "ARexx Enter Number" as the default title in the requester and a
  1172. default value of 0.
  1173.  
  1174. The second form of this command allows you to provide your own title in
  1175. the numeric requester which may be more descriptive of what purpose you
  1176. want the number for.
  1177.  
  1178. The third form gives the user the ability to provide both a title and a
  1179. default numeric value.
  1180.  
  1181. The fourth form gives you the ability to provide a minimum value that can
  1182. be entered, and the fifth for allows both a minimum or maximum value.   f
  1183. a value outside this range is entered, the screen will flash.  Also, the
  1184. minimum and maximum limits are given in a text string below the numeric
  1185. entry gadget.
  1186.  
  1187. Be very careful in using this command since this is one that will require
  1188. "creative" quoting for the title to insure that strings between embedded
  1189. spaces are not interpreted as part of the numeric values.  As an example
  1190. you should use something like this:
  1191.  
  1192.     GETNUMBER '"Enter a number between 3 & 7"' 5 3 7
  1193.  
  1194. This will place "Enter a number between 3 & 7" in the title bar of the
  1195. requester, use 5 as the default value in the numeric entry gadget, and set
  1196. the minimum and maximum possibilities to 3 and 7 respectively.  This will
  1197. also recognize the full title string as a proper quoted operand.
  1198.  
  1199. The numeric entry gadget is followed by a [+] (increment) and a [-]
  1200. (decrement) gadget.  Clicking on one or the other of these gadgets will
  1201. increment or decrement the value in the numeric entry gadget.  This value
  1202. can not decrement below the minimum value or 0 (if no minimum is given) or
  1203. increment above the maximum value.
  1204.  
  1205. The numeric entry gadget is in "replace" mode so that entering a number
  1206. will replace what was previously there.  Hitting [OK] or pressing the
  1207. RETURN key will terminate the requester with the numeric value entered
  1208. returned in the RESULT variable.
  1209.  
  1210. RESULT:  NULL or blank if the the requester was cancelled.
  1211.           n     The numeric value entered in the requester.
  1212.  
  1213.                                  GETSIZE
  1214.  
  1215. Syntax: GETSIZE MESSAGE
  1216.         GETSIZE TEXT
  1217.  
  1218. This command will get the size of the Current Message.  If the operand
  1219. "MESSAGE" is given, it will be the size of the complete message.  If the
  1220. operand "TEXT" is given, it will be only the size of the text portion of
  1221. the message (Message size less the header size and any attachment size).
  1222.  
  1223. RESULT: 0       No Current Message
  1224.         The size of the Current Message or just the text size.
  1225.  
  1226.                                 GETSTRING
  1227.  
  1228. Syntax: GETSTRING
  1229.         GETSTRING title
  1230.         GETSTRING title defaultstring
  1231.  
  1232. This command brings up the AEMail string requester so you can solicit a
  1233. string from the user.
  1234.  
  1235. If no operands are provided with this command, the string requester will
  1236. have "ARexx Enter String" as the default title in the requester with no
  1237. default string.
  1238.  
  1239. The second form of this command allows you to provide your own title in
  1240. the string requester which may be more descriptive of what purpose you
  1241. want the string for.
  1242.  
  1243. The third form gives the user the ability to provide both a title and a
  1244. default string that will appear in the requester when it is first brought
  1245. up.
  1246.  
  1247. Be very careful in using this command since this is one that will require
  1248. "creative" quoting to insure that you have no more than two operand
  1249. strings.  As an example you should use something like this:
  1250.  
  1251.     GETSTRING '"Enter a Folder Name"' '"INBOX"'
  1252.  
  1253. This will send "Enter a Folder Name" and "INBOX" to AEMail which will
  1254. recognize these strings as two separate quoted operands.  Since INBOX is
  1255. one word, it does not have to have the special quoting on it but can be
  1256. simply 'INBOX'.
  1257.  
  1258. RESULT:   NULL or blank if the no string was entered or the requester was
  1259.             cancelled.
  1260.           The string that was entered in the requester.
  1261.  
  1262.                                   GETVAR
  1263.  
  1264. Syntax: GETVAR
  1265.  
  1266. When you are displaying a message and you double click on a message line,
  1267. the Clipboard Window appears.  If you hit one of the function keys to call
  1268. an ARexx script, the line currently being displayed in the clipboard
  1269. string will be transferred to a special variable.
  1270.  
  1271. In your ARexx script you can use GETVAR to extract that string.  If the
  1272. string was an email or web address, your script can use the variable thus
  1273. obtained to send a message to the email address or to call your web
  1274. browser to go to the web address.
  1275.  
  1276. RESULT: The string that was in the clipboard line.
  1277.                                    LAST
  1278.  
  1279. Syntax: LAST
  1280.         LAST NEW
  1281.         LAST SELECTED
  1282.         LAST DELETED
  1283.  
  1284. Without an Operand this command selects the last message in the current
  1285. selected folder as the current message.
  1286.  
  1287. With the NEW operand, this command selects the last un-read (new) message
  1288. in the current selected folder as the current message.
  1289.  
  1290. If a message is unread but deleted, it will NOT be considered an un-read
  1291. message.
  1292.  
  1293. With the SELECTED operand, this command selects the last selected
  1294. (message marked with an asterick) message in the current selected folder
  1295. as the current message.
  1296.  
  1297. With the DELETED operand, this command selects the last message marked as
  1298. deleted in the current selected folder as the current message.
  1299.  
  1300. NOTE: The order of the messages in the folder is the un-sorted order.
  1301. This generally means that the last message is the newest message in the
  1302. folder.
  1303.  
  1304. RESULT: 0       No messages of the particular type in the folder
  1305.         1       Last message is now the current message.
  1306.  
  1307.  
  1308.                                  MESSAGE
  1309.  
  1310. This command is used to set various flags on the Current Message.  After
  1311. the execution of this command, the message list, if it is currently being
  1312. displayed, will be re-displayed with the changed status.  The forms of
  1313. this command are as follows:
  1314.  
  1315. Syntax: MESSAGE SELECT
  1316.  
  1317. This command marks the Current Message as selected.
  1318.  
  1319. RESULT: -1  There is no Current Message.
  1320.          0  The Current Message is already marked as selected.
  1321.          1  The Current Message is now marked as selected.
  1322.  
  1323. ***
  1324.  
  1325. Syntax: MESSAGE UNSELECT
  1326.  
  1327. This command marks the Current Message as un-selected.
  1328.  
  1329. RESULT: -1  There is no Current Message.
  1330.          0  The Current Message is not marked as selected.
  1331.          1  The Current Message is now marked as un-selected.
  1332.  
  1333. ***
  1334.  
  1335. Syntax: MESSAGE DELETE
  1336.  
  1337. This command marks the Current Message as deleted.
  1338.  
  1339. RESULT: -1  There is no Current Message.
  1340.          0  The Current Message is already marked as deleted.
  1341.          1  The Current Message is now marked as deleted.
  1342.  
  1343. ***
  1344.  
  1345. Syntax: MESSAGE UNDELETE
  1346.  
  1347. This command marks the Current Message as not deleted.
  1348.  
  1349. RESULT: -1  There is no Current Message.
  1350.          0  The Current Message is not currently marked as deleted.
  1351.          1  The Current Message is now no longer marked as deleted.
  1352.  
  1353. ***
  1354.  
  1355. Syntax: MESSAGE READ
  1356.  
  1357. This command marks the Current Message as being read.
  1358.  
  1359. RESULT: -1  There is no Current Message.
  1360.          0  The Current Message is already marked as being read.
  1361.          1  The Current Message is now marked as being read.
  1362.  
  1363. ***
  1364.  
  1365. Syntax: MESSAGE MAKE NEW
  1366.  
  1367. This command marks the Current Message as unread or new.
  1368.  
  1369. NOTE: If the message was marked as deleted, only the "new" flag is set;
  1370. otherwise, both the "new" and "unread" flags are set.
  1371.  
  1372. RESULT: -1  There is no Current Message.
  1373.          0  The Current Message is already marked as unread (new).
  1374.          1  The Current Message is now marked as unread.
  1375.  
  1376. ***
  1377.  
  1378. Syntax: MESSAGE SELECT ALL
  1379.  
  1380. All messages in the current selected folder are marked as selected.  This
  1381. command does not change the Current Message status.
  1382.  
  1383. RESULT:  0  There are no messages in the selected folder.
  1384.          1  All of the messages in the selected folder are marked as
  1385.             selected.
  1386.  
  1387. ***
  1388.  
  1389. Syntax: MESSAGE SELECT NONE
  1390.         MESSAGE UNSELECT ALL
  1391.  
  1392. This command can be expressed in either form above.
  1393.  
  1394. All messages in the current selected folder are marked as un-selected.
  1395. This command does not change the Current Message status.
  1396.  
  1397. RESULT:  0  There are no messages in the selected folder.
  1398.          1  All of the messages in the selected folder are now marked as
  1399.             un-selected.
  1400.  
  1401.                                    NEXT
  1402.  
  1403. This command is used to select the next message in the current folder or
  1404. to select the next name string from the list of To:  or cc:  recipients.
  1405.  
  1406. ***
  1407.  
  1408. Syntax: NEXT
  1409.         NEXT NEW
  1410.         NEXT SELECTED
  1411.         NEXT DELETED
  1412.  
  1413. Without an operand this command selects the next message, regardless of
  1414. it's status, in the current selected folder as the current message.
  1415.  
  1416. With the NEW operand, this command selects the next un-read (new) message
  1417. in the current selected folder as the current message.
  1418.  
  1419. If a message is unread but deleted, it will NOT be considered an un-read
  1420. message.
  1421.  
  1422. With the SELECTED operand, this command selects the next selected (message
  1423. marked with an asterick) message in the current selected folder as the
  1424. current message.
  1425.  
  1426. With the DELETED operand, this command selects the next message marked as
  1427. deleted in the current selected folder as the current message.
  1428.  
  1429. NOTE:  The order of the messages in the folder is the un-sorted order.
  1430. This generally means that the order of the messages in the folder is that
  1431. older messages are before newer messages.
  1432.  
  1433. RESULT: 0       No more messages of the particular type are in the folder.
  1434.                 At the end of the message list.
  1435.         1       The next message is now the current message.
  1436.  
  1437. ***
  1438.  
  1439. Syntax: NEXT NAME
  1440.  
  1441. This command returns the next name from the header field that was
  1442. referenced by the last FIRST command.  A FIRST TONAME, FIRST CCNAME, or
  1443. FIRST BCCNAME command must have been issued prior to issuing the first
  1444. NEXT NAME command.  Each NEXT NAME command that is issued retrieves the
  1445. next name in that header field.  Once the end of the name list is reached,
  1446. another FIRST command must be issued before another NEXT NAME command is
  1447. issued.  The name can be in one of the following formats:
  1448.  
  1449.         email-address (Full Name)
  1450.         Full Name <email-address>
  1451.         email-address
  1452.         addressbook-nickname
  1453.  
  1454. Names in the header recipient lists are separated by commas; however, a
  1455. comma may be embedded within a real name if the real name is surrounded by
  1456. quotes.
  1457.  
  1458. If you wish to extract either the Full Name, email-address, or the
  1459. addressbook-nickname from the RESULT you can set the RESULT to a variable
  1460. and then use the EXTRACT command with that variable as the arguement.
  1461.  
  1462. RESULT: -2              The name string has not been started with the
  1463.                         FIRST command.
  1464.          NULL or blank  You are at the end of the list.  There are no 
  1465.                         more names in the current header field.
  1466.          The next name in the appropriate header.
  1467.  
  1468.                                   OKAY1
  1469.  
  1470. Syntax: OKAY1 text
  1471.  
  1472. This commands presents the AEMail notification requester containing the
  1473. supplied text.  If there are any ARexx specific command operators within
  1474. the text stream, the stream should be surrounded in quotes.
  1475.  
  1476. The notification requester has one button marked "Continue".  Clicking on
  1477. this button will terminate the requester and the OKAY1 command.
  1478.  
  1479. Warning: Be careful of the size of the text string that you pass to this
  1480. command.  If the string is too long without intervening line feeds, the
  1481. "Continue" button could be positioned off the screen and you will have no
  1482. way to terminate the requester.  This can be particularly true of returned
  1483. strings that are being displayed.  It is best to use the ARexx LEFT()
  1484. function to insure you have a short enough string.
  1485.  
  1486. RESULT: 1           Always returned
  1487.  
  1488.  
  1489.                                   OKAY2
  1490.  
  1491. Syntax: OKAY1 responses text
  1492.  
  1493. This commands presents the AEMail notification requester containing the
  1494. supplied text.  If there are any ARexx specific command operators within
  1495. the text stream, the stream should be surrounded in quotes.
  1496.  
  1497. "responses" provides a list of possible responses to the requester.  Any
  1498. number of responses can be provided.  Each response must be separated by
  1499. the vertical bar ("|").  The entire response string must be surrounded by
  1500. quote marks.
  1501.  
  1502. The notification requester has as many buttons as they are responses.  The
  1503. wording in these buttons is controlled by the response string.  Clicking
  1504. on any of these buttons will terminate the requester and the OKAY2
  1505. command.
  1506.  
  1507. RESULT: 0           The last response in the response string was selected.
  1508.         1           The first response was selected.
  1509.         n           The second through nth (last - 1) response was selected.
  1510.  
  1511.  
  1512.                                  PREVIOUS
  1513. Syntax: PREVIOUS
  1514.         PREVIOUS NEW
  1515.         PREVIOUS SELECTED
  1516.         PREVIOUS DELETED
  1517.  
  1518. Without an operand this command selects the previous message, regardless
  1519. of it's status, in the current selected folder as the current message.
  1520.  
  1521. With the NEW operand, this command selects the previous un-read (new)
  1522. message in the current selected folder as the current message.
  1523.  
  1524. If a message is unread but deleted, it will NOT be considered an un-read
  1525. message.
  1526.  
  1527. With the SELECTED operand, this command selects the previous selected
  1528. (message marked with an asterick) message in the current selected folder
  1529. as the current message.
  1530.  
  1531. With the DELETED operand, this command selects the previous message marked
  1532. as deleted in the current selected folder as the current message.
  1533.  
  1534. NOTE:  The order of the messages in the folder is the un-sorted order.
  1535. This generally means that the order of the messages in the folder is that
  1536. older messages are before newer messages.
  1537.  
  1538. RESULT: 0       No more messages of the particular type are in the folder.
  1539.                 At the beginning of the message list.
  1540.         1       The next previous is now the current message.
  1541.  
  1542.  
  1543.  
  1544.                                   QUEUE
  1545.  
  1546. Syntax: QUEUE "message-file-name" [MAILTO userid]
  1547.  
  1548. The message file indicated by "message-file-name" will be read into the
  1549. system and will be placed in the QUEUED folder.  This message must have
  1550. correctly formatted headers.  A blank line must separate the headers from
  1551. the body of the message.
  1552.  
  1553. The "message-file-name" should be the full path name of the message file
  1554. and it should be quoted since the path will contain characters that ARexx
  1555. will attempt to interpret as operators.  It may also contain embedded
  1556. spaces.  If it does contain embedded spaces, double quote pairs must be
  1557. used, ie. '"filename string"' or '"'variable'"'.
  1558.  
  1559. Any address provided with the To: header can be either an Address Book
  1560. nickname or a full email address.  Multiple To: addresses can be provided
  1561. as well as multiple cc: or bcc: addresses.
  1562.  
  1563. Instead of a To: address provided in the message the optional MAILTO
  1564. keyword can be used to provide a userid which can be an Address Book
  1565. nickname or an email address.  The MAILTO address will be added to any
  1566. addresses provide with a To: header.
  1567.  
  1568. If the From: or Reply-To: addresses are not given, these addresses will be
  1569. taken from the default From: and Reply-To addresses.
  1570.  
  1571. Any Date: header is ignored since the Date: header will be constructed
  1572. when the message is sent.
  1573.  
  1574. Any other non-standard headers can be supplied in the message file and
  1575. they will be included with the message.
  1576.  
  1577. Only the To:  header has to be provided unless the MAILTO parameter is
  1578. given.  If the MAILTO parameter is used, no headers have to be provided
  1579. with the message.  However, if this is done, a blank line MUST be the
  1580. first line in the message file.
  1581.  
  1582. Additional RC type errors can be received by this command if the
  1583. message-file-name is invalid or an error occurred reading in the message
  1584. file.  Each of these errors have a severity level of 5 with one of the
  1585. following messages placed in the AEMAIL.LASTERROR variable:
  1586.  
  1587.     105: Error Opening Passed Message
  1588.     106: Error retrieving passed message
  1589.  
  1590. No validation is made on the To:  address in the message.  If it is
  1591. invalid, either the user will receive an error when the message is sent or
  1592. a message will be received indicating "Returned mail:  User unknown".
  1593.  
  1594. RESULT: 1:          Message was placed in the QUEUED folder.
  1595.  
  1596.  
  1597.  
  1598.                                    QUIT
  1599. Syntax: QUIT
  1600.  
  1601. This command will terminate AEMail.  It operates silently so no messages
  1602. will appear.
  1603.  
  1604. After issuing this command, you can not issue any more commands to AEMail
  1605. since AEMail and the AEMail ARexx Port will no longer be there to receive
  1606. amy commands.
  1607.  
  1608. RESULT: None
  1609.  
  1610.                                  REPLYTO
  1611.  
  1612. Syntax: REPLYTO
  1613.  
  1614. This command returns the Reply-To:  header of the current message without
  1615. the "Reply-To:  ".  It has no operands.
  1616.  
  1617. RESULT: -1              No current message
  1618.         NULL or blanks  No Reply-To: header
  1619.         Reply-To: header
  1620.                                    SAVE
  1621.  
  1622. This command can save the current message or selected messages or the text
  1623. portion of a message to a file.  The current message or current message
  1624. text can also be directly returned in the RESULT variable.  The Current
  1625. Message text can also be saved to the clipboard.
  1626.  
  1627. The various forms of this command are given below:
  1628.  
  1629. Syntax: SAVE MESSAGE
  1630.  
  1631. This command will return the Current Message in the RESULT variable. This
  1632. will be the complete message including all headers, message body, and all
  1633. attachments.
  1634.  
  1635. WARNING: This will return only the first 4092 characters of the current
  1636. message.  Line Feed characters will be included at the end of each line in
  1637. the message.
  1638.  
  1639. You can use the GETSIZE MESSAGE command to obtain the size of the message
  1640. to see if it will fit.
  1641.  
  1642. RESULT: NULL or blank       There is no Current Message
  1643.         The message (up to 4092 characters)
  1644.  
  1645. ***
  1646.  
  1647. Syntax: SAVE MESSAGE [TO] filename
  1648.  
  1649. This command will save the Current Message to the file whose complete path
  1650. and file name is filename.  This should be a quoted variable.  You can
  1651. solicit a filename by using the GETFILENAME command before issuing this
  1652. command.
  1653.  
  1654. The keyword TO is optional.
  1655.  
  1656. The message saved is the complete message including all headers, message
  1657. body, and all attachments.  Except for available disk space, there is no
  1658. limit on the size of the message.  Line Feed characters will be included
  1659. at the end of each line in the message.
  1660.  
  1661. RESULT:  0      There is no current message
  1662.          1      The current message has been saved.
  1663.  
  1664. ***
  1665.  
  1666. Syntax: SAVE SELECTED MESSAGES [TO] filename
  1667.  
  1668. This command will save all of the selected messages in the current
  1669. selected folder to the file whose complete path and file name is filename.
  1670. This should be a quoted variable.  You can solicit a filename by using the
  1671. GETFILENAME command before issuing this command.
  1672.  
  1673. All of the messages will be saved in the single file specified as a block
  1674. of messages.
  1675.  
  1676. The keyword TO is optional.
  1677.  
  1678. The messages saved include the complete message including all headers,
  1679. message body, and all attachments.  Except for available disk space, there
  1680. is no limit on the size of the message.  Line Feed characters will be
  1681. included at the end of each line in the message.
  1682.  
  1683. RESULT:  0      There is no messages selected
  1684.          1      The current message has been saved.
  1685.  
  1686. ***
  1687.  
  1688. Syntax: SAVE TEXT
  1689.         SAVE TEXT NOLF
  1690.  
  1691. This command will return the text body of the Current Message in the
  1692. RESULT variable.  This will be only the body text without headers or
  1693. attachments.
  1694.  
  1695. Normally the text is returned with a line feed separating each line.  If
  1696. you use the "NOLF" operand, this line feed will be left off.  This means
  1697. that the body lines will be one continuous string of data.  This can be
  1698. very helpful if you have a short message generated by a forms command sent
  1699. by email in a web page.
  1700.  
  1701. WARNING:  This will return only the first 4092 characters of the current
  1702. message body text.  Line Feed characters will be included at the end of
  1703. each line in the message unless NOLF is specified.
  1704.  
  1705. You can use the GETSIZE TEXT command to obtain the size of the message
  1706. body to see if it will fit.
  1707.  
  1708. RESULT: NULL or blank       There is no Current Message
  1709.         The message text (up to 4092 characters)
  1710.  
  1711. ***
  1712.  
  1713. Syntax: SAVE TEXT [TO] filename
  1714.  
  1715. This command will save the text body of the Current Message to the file
  1716. whose complete path and file name is filename.  This should be a quoted
  1717. variable.  You can solicit a filename by using the GETFILENAME command
  1718. before issuing this command.
  1719.  
  1720. The keyword TO is optional.
  1721.  
  1722. The text saved is only the body text without headers or attachments.
  1723. Except for available disk space, there is no limit on the size of the
  1724. message text.  Line Feed characters will be included at the end of each
  1725. line in the message.
  1726.  
  1727. RESULT:  0      There is no current message
  1728.          1      The current message text has been saved.
  1729.  
  1730. ***
  1731.  
  1732. Syntax: SAVE TEXT [TO] CLIPBOARD
  1733.         SAVE TEXT [TO] CLIPBOARD n
  1734.  
  1735. The first form of this command will save the text body of the Current
  1736. Message to the clipboard unit that is currently active.  The second form
  1737. will allow you to save the text to the clipboard unit specified by n.
  1738.  
  1739. You can determine which clipboard is currently active by using the GETCLIP
  1740. UNIT command.
  1741.  
  1742. If you use the "n" parameter, the currently active clipboard unit will be
  1743. changed to n after the command is successfully executed (RESULT of 1).
  1744. The keyword TO is optional.
  1745.  
  1746. The text saved is only the body text without headers or attachments.
  1747. Except for available RAM space, there is no limit on the size of the
  1748. message text.  Line Feed characters will be included at the end of each
  1749. line in the message.
  1750.  
  1751. RESULT:  0      There is no current message
  1752.          1      The current message text has been saved to the clipboard.
  1753.  
  1754. ***
  1755.  
  1756. Syntax: SAVE "string of text" [TO] CLIPBOARD
  1757.         SAVE "string of text" [TO] CLIPBOARD n
  1758.  
  1759. The first form of this command will save the string of text passed as a
  1760. quoted string to the clipboard unit that is currently active.  The second
  1761. form will allow you to save the string to the clipboard unit specified by
  1762. n.
  1763.  
  1764. You can determine which clipboard is currently active by using the GETCLIP
  1765. UNIT command.
  1766.  
  1767. If you use the "n" parameter, the currently active clipboard unit will be
  1768. changed to n after the command is successfully executed (RESULT of 1).
  1769. The keyword TO is optional.
  1770.  
  1771. The keyword TO is optional.
  1772.  
  1773. The string saved must be quoted to allow for embedded spaces and special
  1774. characters.  As an example:
  1775.  
  1776.     SAVE '"This is a string of characters"' TO CLIPBOARD 3
  1777.  
  1778. will save the string "This is a string of characters" to clipboard number
  1779. 3.
  1780.  
  1781. The string is limited to 119 characters. If a larger string is given it
  1782. will be truncated at 119 characters.
  1783.  
  1784. RESULT:  1      The string has been saved to the clipboard.
  1785.  
  1786.                                SCREENTOBACK
  1787.  
  1788. Syntax: SCREENTOBACK AEMAIL
  1789.         SCREENTOBACK WORKBENCH
  1790.         SCREENTOBACK public-screen-name
  1791.  
  1792. This command brings either the AEMail screen, the Workbench screen or
  1793. the named public-screen-name to the back of the display.
  1794.  
  1795. RESULT: 0   The public-screen-name is invalid or no longer open
  1796.         1   The specified screen has been moved to the back.
  1797.  
  1798.  
  1799.                               SCREENTOFRONT
  1800.  
  1801. Syntax: SCREENTOFRONT AEMAIL
  1802.         SCREENTOFRONT WORKBENCH
  1803.         SCREENTOFRONT public-screen-name
  1804.  
  1805. This command brings either the AEMail screen, the Workbench screen or
  1806. the named public-screen-name to the front of the display.
  1807.  
  1808. RESULT: 0   The public-screen-name is invalid or no longer open
  1809.         1   The specified screen is now the front most screen.
  1810.  
  1811.  
  1812.                                  SUBJECT
  1813.  
  1814. Syntax: SUBJECT
  1815.  
  1816. This command returns the Subject:  header of the current message without
  1817. "Subject: ".  It has no operands.
  1818.  
  1819. Also, the RE: and (fwd), if present, is stripped from the header string.
  1820. You can use the FLAGS command to determine if the current message is a
  1821. reply or forwarded message.
  1822.  
  1823. RESULT: -1              No current message
  1824.         NULL or blanks  No Subject: header
  1825.         Subject: header
  1826.  
  1827.  
  1828.                                     TO
  1829.  
  1830. Syntax: TO
  1831.  
  1832. This command returns the To:  header of the current message without the
  1833. "To: ".  It has no operands.
  1834.  
  1835. RESULT: -1              No current message
  1836.         NULL or blanks  No To: header
  1837.         To: header
  1838.  
  1839.                               Error Messages
  1840.                               --------------
  1841.  
  1842. When a command returns an RC value other than 0 the RC code represents a
  1843. severity code.  Severity codes are usually 5 or 20.  A string error
  1844. message will also appear in the AEMAIL.LASTERROR variable.  These errors
  1845. can be interrogated and displayed.
  1846.  
  1847. The errors that you can expect from AEMail are as follows:
  1848.  
  1849.         "100: Unknown command"
  1850.         "101: Syntax Error"
  1851.         "102: No Operand Required"
  1852.         "103: Missing Operand"
  1853.         "104: Too Many Operands"
  1854.         "105: Error Opening Passed Message"
  1855.         "106: Error retrieving passed message"
  1856.         "110: Out of Memory"
  1857.  
  1858. Additional errors which will not have a error message number associated
  1859. with them are:
  1860.  
  1861.         "Unable to open input mail file"
  1862.         "Error reading input mail file"
  1863.         "Unable to open output file"
  1864.         "Error writing to output file"
  1865.  
  1866.